import service from "@/server/serviceIndex";

//根据用户id-查询-关注-实体店列表
export const getFollowShopAPI = (page, limit, userId) => {
  return service({
    method: "get",
    url: `/pipayshopapi/store-follow-focus/followList/${page}/${limit}/${userId}`,
  });
};

//获取实体卖家订单
export const getShopListAPI = (data) => {
  return service({
    method: "post",
    url: '/pipayshopapi/store-order/getOrderListByShopId',
    data: data
  });
};

//根据用户id查询用户收藏的实体类商品列表
export const getCollectShopAPI = (page, limit,userId) => {
  return service({
    method: "get",
    url: `/pipayshopapi/store-collection/collectList/${page}/${limit}/${userId}`,
  });
};

//根据店铺id查找实体店商品的上架和下架列表
export const getSelectStatusListAPI = (limit, page, shopId) => {
  return service({
    method: "get",
    url: `/pipayshopapi/store-commodity-info/selectStatusListByShopId?limit=${limit}&page=${page}&shopId=${shopId}`,
  });
}

//根据商品id，上架变为下架
export const getUpdateCommodityUpAPI = (commodityId) => {
  return service({
    method: 'post',
    url:`/pipayshopapi/store-commodity-info/updateCommodityUp/${commodityId}`
  })
} 
//根据商品id，下架变为审核
export const getUpdateCommodityCheckAPI = (commodityId) => {
  return service({
    method: 'post',
    url:`/pipayshopapi/store-commodity-info/updateCommodityCheck/${commodityId}`
  })
} 